function Window (options)
   -- check mandatory options
   if type(options.title) ~= "string" then
	  error("no title")
   elseif type(options.width) ~= "number" then
	  error("no width")
   elseif type(options.height) ~= "number" then
	  error("no height")
   end
   return options
end

w = Window{x=0, y=0, width=300, height=200,
	       title="Lua", border=true}
for k, v in pairs(w) do
    print(k, v)
end
